package com.starhub.application.model.enums;

/**
 * 模型类型
 */
public enum ModelTypeEnums {
    CHAT("chat", "大语言模型"),
    EMBEDDING("embedding", "向量化模型"),
    RERANKING("reRanking", "重排序模型"),
    ;

    private final String code;
    private final String desc;

    ModelTypeEnums(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    } 

    public String getDesc() {
        return desc;
    }

    public static ModelTypeEnums getByCode(String code) {
        for (ModelTypeEnums type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
} 
